package com.lanmaoly.cunzheng;

import com.lanmaoly.cunzheng.behavior.impl.FlyWithWing;
import com.lanmaoly.cunzheng.behavior.impl.NoQuack;

/**
 * 小黄鸭
 *
 * @author
 */
public class YellowDuck extends Duck {


    public YellowDuck() {
        // 初始化示例变量不够弹性 固定的行为 但是必须写否则有可能空指针
        flyBehavior = new FlyWithWing();
        quackBehavior = new NoQuack();
    }

    @Override
    public void dispaly() {
        System.out.println("我是一只小黄鸭.....");
    }

}
